PXC Documentation

PXC Home

Particle

pre 1.18

Generate particle effect.

Node Data

Display name

Particle

Internal name

Node_Particle

Inheritances

Node_Particle

Inputs

Output

vec2

Dimension

surface

Background

Sprite

surface

Particle Sprite

enum

Surface Array

range

Animation Speed

bool

Stretch Animation

enum

On Animation End

Spawn

bool

Spawn

enum

Spawn Type

trigger

Spawn

int

Spawn Delay

int

Burst Duration

range

Spawn Amount

Lifespan

range

Lifespan

Source

enum

Spawn Source

area

Spawn Area

surface

Distribution Map

path

Spawn Path

vector

Spawn Data

enum

Distribution

float

Distance

float

Uniform Period

Movement

range

Speed

Direction

enum

Direction Distribution

rotRand

Initial Direction

bool

Directed From Center

rotRange

Angle Range

Wrap

toggle

Wrap

Rotation

rotRand

Initial Rotation

bool

Rotate By Direction

Animated

enum

Rotation Type

rotRand

Rotational Speed

rotRand

Target Angle

Snap

float

Snap Rotation

Scale

range2

Scale

range

Size

Color

gradient

Color On Spawn

palette

Color By Index

gradient

Color Over Lifetime

range

Alpha

Sampler

surface

Sample Surface

Render

bool

Render

enum

Render Type

int

Line Life

bool

Loop

bool

Round Position

enum

Blend Mode

bool

Sort Y

Follow Path

bool

Follow Path

path

Path

bool

Path Loop

range2

Path Range

range

Range Shift

curve

Path Speed

float

Deviation

Physics

bool

Use Physics

range

Friction

range

Acceleration

Gravity

range

Gravity

rot

Gravity Direction

Turning

range

Turning

bool

Turn Both Directions

float

Turn Scale With Speed

Ground

bool

Collide Ground

enum

Ground Offset Type

range

Ground Offset

Bounce

slider

Bounce Amount

slider

Bounce Friction

Wiggles

bool

Use Wiggles

vec2

Direction

vec2

Position

vec2

Rotation

vec2

Scale

Unused

int

Pre-Render

int

Boundary Data

surface

Atlas

trigger

Reset Seed

Outputs

surface

Surface Out

particle

Data

Attributes

Color Depth
Interpolation


Simulate 2D particle effect.



Properties


Sprite
Surface ArrayMethod of procesing surface array:
- Random: Set random surface for each particle.
- Order: Set surface in order of the particle spawning.
- Animation: Use surface array as animation. Particle spawn with the first surface in the array then increase the index over lifespan.
- Scale: Select array index based on particle scale.
Animation SpeedFor animation type, define surface array animating speed (array index per frame of lifespan.)
Stretch AnimationFor animation type, whether to stretch animation to particle lifespan.
On Animation EndFor animation type, choose what to do when animation reach an end.
Spawn
Spawn TypeSpawn Timing
- Stream: Spawn particles constantly.
- Burst: Spawn particles once in burst.
- Trigger: Spawn particles using manual trigger.
Spawn DelayFor Stream type, frames delay between each particle spawn.
Spawn FrameFor Burst type, frame index to spawn.
Burst DurationFor Burst type, amount of frames to spawn.
Spawn AmountAmount of particles to spawn per frame.
Spawn > Lifespan
LifespanParticle lifespan.
Spawn > Source
Spawn SourceType of particle spawn source.
- Area Inside: Spawn inside an area.
- Area Border: Spawn around area border.
- Map: Spawn based on greyscale surface.
- Path: Spawn along a path.
- Direct Data: Spawn from array of vec2 points.
DistributionFor area, path source, particle spawning pattern.
Uniform PeriodFor uniform distribution, define distribution amount (e.g. if set to 4, particle will spawn at 4 fixed points in the source.)
If set to zero, will use Spawn Amount.
Movement
SpeedParticle initial speed. If use speed over lifespan curve it may causes conflict with physics.
Movement > Direction
Initial DirectionInitial direction range.
Directed From CenterMake particle move away from the spawn center.
Angle RangeFor Directed From Center, define range of angle around the center.
Movement > Wrap
WrapLoop particle from one side of the surface to another.
Rotation
Rotate By DirectionMake the particle rotates to follow its movement. This value will be offset by Initial Rotation.
Rotation > Animated
Rotation TypeType of rotation animation.
- Speed: Add rotation angle per frame.
- Fix Relative: Lerp to angle ralative to orignal angle over lifespan.
- Fix target: Lerp to fix angle over lifespan.
SnapSnap rotation to fixed angle.
Scale
ScaleDefine non-uniform particle scale.
SizeUniform particle scale.
Color
Color On SpawnInitial particle color.
Color By IndexParticle color per spawn index.
Color Over LifetimeApply color over lifespan.
Sample SurfaceSample color from another surface on spawn.
Render
Render TypeRendering type, surface or line.
Line LifeLine lifespan in frames.
LoopRender the whole simulation before the first frame to create looping animation. Will have major impact to performance.
Round PositionRound position to the closest integer value to avoid anti-aliasing.
Sort YSort particle by Y position before rendering.
Follow Path
Follow PathMake particle follow path movement. This will added to particle initial position so set particle to spawn at [0,0] to have it
follow the path exactly.
Path RangeRange of path to follow.
Range ShiftRandomly shift path range per particle.
Path SpeedPath following curve.
DeviationHow much of the initial position to apply to the final position (Final position = Path position + Simulation position * Deviation).
Physics
FrictionDecrease speed by a fraction of the current speed per frame.
AccelerationIncrease, decrease speed by a fixed amount per frame.
Physics > Gravity
GravityGravity strength
Physics > Turning
TurningApply constant rotation change to turn the particle.
Turn Both DirectionsApply randomized 1 or -1 multiplier to the turning speed.
Turn Scale With SpeedScale turning speed with the current speed.
Ground
Collide GroundCollide particle with a horizontal ground.
Ground Offset TypeMethods for setting ground Y position. Absolute for fixed ground for every particle, Relative will set ground relative to
particle spawn position.
Ground > Bounce
Bounce AmountBounce particle when hit the ground.
Bounce FrictionReduce horizontal velocity when hitting the ground.
Wiggles
DirectionRandomly change particle direction.
PositionRandomly apply direct movement to the particle.
RotationRandomly rotate particle.
ScaleRandomly scale particle.



Commit History


1.21.8.009
  • Setting Uniform Period to zero will use spawn amount as period.
1.21.6.004
  • Fix line render type not loop correctly.
1.21.5.006
  • Path deviation now a floating value with curve modifier.
1.21.4.004
  • Add path position shift.
  • Add path follow speed curve.
1.21.3.008
  • Add Sort Y option.
  • Add Poisson distribution for area inside spawn source.

Related Links